/**
 *  JSimProd - Java simulation code for production processes
 *  Copyleft Jorge Mira Yagüe <jorge.mira.yague@gmail.com>
 *  Universidad de Alicante 2009
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/*
 * FrmAbout.java
 *
 * Created on 24-ago-2009, 21:59:19
 */
package gui.forms;

import java.awt.Image;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.Icon;
import javax.swing.ImageIcon;

/**
 *
 * @author jorge
 */
public class FrmAbout extends javax.swing.JDialog {

    /** Creates new form FrmAbout */
    public FrmAbout() {
        initComponents();

        this.getRootPane().setDefaultButton(btnClose);

        String fileString = "/res/icons/logo.png";
        String logoString = "/res/img/ua_logo.png";
        try {
            Image icon = ImageIO.read(getClass().getResource(fileString));
            this.setIconImage(icon);
            Icon logo = new ImageIcon(getClass().getResource(logoString));
            lblLogo.setIcon(logo);
        } catch (IOException ioe) {
            System.out.println("Error loading file: " + fileString);
        }
 }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnClose = new javax.swing.JButton();
        lblLogo = new javax.swing.JLabel();
        lbljsimprod = new javax.swing.JLabel();
        lblNameJMY = new javax.swing.JLabel();
        lblMailJMY = new javax.swing.JLabel();
        lblNameRCC = new javax.swing.JLabel();
        lblURLsrc = new javax.swing.JLabel();
        lblMailRCC = new javax.swing.JLabel();
        lblNameUA = new javax.swing.JLabel();
        lblURLUA = new javax.swing.JLabel();

        setTitle("About JSimProd");
        setResizable(false);

        btnClose.setText("Close");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        lblLogo.setBackground(new java.awt.Color(255, 255, 255));

        lbljsimprod.setFont(new java.awt.Font("Dialog", 1, 24));
        lbljsimprod.setText("JSimProd 0.1a");

        lblNameJMY.setText("Jorge Mira Yagüe");

        lblMailJMY.setText("<html><a href=\"mailto:jorge.mira.yague@gmail.com\">jorge.mira.yague@gmail.com</a></html>");

        lblNameRCC.setText("Rafael C. Carrasco");

        lblURLsrc.setFont(new java.awt.Font("Dialog", 1, 16));
        lblURLsrc.setText("<html><a href=\"http://code.google.com/p/jsimprod/\">http://code.google.com/p/jsimprod</a></html>");

        lblMailRCC.setText("<html><a href=\"mailto:rafael.c.carrasco@gmail.com\">rafael.c.carrasco@gmail.com</a></html>");

        lblNameUA.setText("Universidad de Alicante 2008/2009");

        lblURLUA.setText("<html><a href=\"http://www.ua.es\">http://www.ua.es</a></html>");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(462, Short.MAX_VALUE)
                .addComponent(btnClose)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblNameJMY)
                    .addComponent(lbljsimprod)
                    .addComponent(lblNameRCC)
                    .addComponent(lblNameUA)
                    .addComponent(lblURLsrc)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(lblMailJMY))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(lblMailRCC))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(12, 12, 12)
                        .addComponent(lblURLUA)))
                .addContainerGap(16, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lbljsimprod)
                        .addGap(18, 18, 18)
                        .addComponent(lblNameJMY)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblMailJMY)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblNameRCC)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblMailRCC)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblNameUA)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblURLUA)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(lblURLsrc))
                    .addComponent(lblLogo, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)
                .addComponent(btnClose)
                .addContainerGap())
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-543)/2, (screenSize.height-298)/2, 543, 298);
    }// </editor-fold>//GEN-END:initComponents

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
        this.setVisible(false);
    }//GEN-LAST:event_btnCloseActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnClose;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JLabel lblMailJMY;
    private javax.swing.JLabel lblMailRCC;
    private javax.swing.JLabel lblNameJMY;
    private javax.swing.JLabel lblNameRCC;
    private javax.swing.JLabel lblNameUA;
    private javax.swing.JLabel lblURLUA;
    private javax.swing.JLabel lblURLsrc;
    private javax.swing.JLabel lbljsimprod;
    // End of variables declaration//GEN-END:variables
}
